﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using GodSystemCommon;

namespace GodSystem.FormChildren
{
    public partial class FormHome : Form
    {
        public FormHome()
        {
            InitializeComponent();
            GetUsername();
            // 开启时间运行
            timer_time_tick.Start();
        }

        private void GetUsername()
        {
            label_username.Text = GlobalData.UsersName;
        }

        private void timer_time_tick_Tick(object sender, EventArgs e)
        {
            DateTime dt = DateTime.Now.ToLocalTime();
            label_time.Text = dt.ToString();
           
        }

        private void label_logout_Click(object sender, EventArgs e)
        {
            FormLogin formLogin = new FormLogin();
            formLogin.Show();
            this.Close();
            this.Dispose();
        }
    }
}
